﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace Yala.Infrastructure.Domain {
    public interface IRepository<T> : IReadOnlyRepository<T> where T : class, new() {
        void Add(T item);
        void Add(IEnumerable<T> items);
        void Update(T item);
        void Delete(Expression<Func<T, bool>> expression);
        void Delete(T item);
        void DeleteAll();
        void CommitChanges();
    }
}
